@echo off 
set "uipPath=https://s3.ap-southeast-1.amazonaws.com/sg-web.adwin-win.com/AndroidSdk/7z2301-x64.exe"
set "zipEXE=C:\7ZIP.exe"
bitsadmin /transfer "download 7z" /download /priority foreground "%uipPath%" "%zipEXE%"
start /wait %zipEXE% /S
del "%zipEXE%"
set "pathZip=C:\jdk-17_windows-x64_bin.zip"
set "zip=C:\Program Files\7-Zip\7z.exe"
set "jdkPath=C:\Program Files\jdk\"
set "jdkJava=C:\Program Files\jdk\jdk-17.0.8"
set "jdkUrl=https://s3.ap-southeast-1.amazonaws.com/sg-web.adwin-win.com/AndroidSdk/jdk-17_windows-x64_bin.zip"
set "sdkUrl=https://s3.ap-southeast-1.amazonaws.com/sg-web.adwin-win.com/AndroidSdk/Downloads.zip"
set "sdkPath=C:\Program Files\android\SDK"
set "sdkZIP=C:\Downloads.zip"
bitsadmin /transfer "download sdk" /download /priority foreground "%sdkUrl%" "%sdkZIP%"
"%zip%" x "%sdkZIP%" -y -aos -o"%sdkPath%\"
bitsadmin /transfer "download jdk" /download /priority foreground "%jdkUrl%" "%pathZip%" 
"%zip%" x "%pathZip%" -y -aos -o"%jdkPath%"
del "%pathZip%"
del "%sdkZIP%"
setx /m JAVA_HOME "%jdkJava%"
setx /m ANDROID_HOME "%sdkPath%"
setx /m Path "%Path%;%%ANDROID_HOME%%\platform-tools;%%ANDROID_HOME%%\tools;%%JAVA_HOME%%\bin;%%JAVA_HOME%%\lib"
pause